package manage.service.impl;

import manage.dao.BianzhiMapper;
import manage.model.Bianzhi;
import manage.service.BianzhiServcie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: create by  Raphaelkxy
 * @version: v1.0
 * @description: manage.service.impl
 * @date:2019/8/26
 */
@Service
public class BianzhiServcieImpl implements BianzhiServcie {

    @Autowired
    private BianzhiMapper bianzhiMapper;
    @Override
    public List<Bianzhi> getBianzhiList() {
        return bianzhiMapper.selectAll();
    }

    @Override
    public int updateBianzhi(Bianzhi bianzhi) {
        return bianzhiMapper.updateByPrimaryKey(bianzhi);
    }

    @Override
    public int deleteBianzhi(int id) {
        return bianzhiMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insertBianzhi(Bianzhi bianzhi) {
        return bianzhiMapper.insert(bianzhi);
    }

    @Override
    public Bianzhi geyByid(Integer id) {
        return bianzhiMapper.selectByPrimaryKey(id);
    }
}
